import request from '../req'
import type {PageInfoDto, PageQueryDto} from '../commonType'
import type {ListDto} from './type'

/**
 * @description 获取待审核公司列表
 * @param data
 * @returns
 */
export const queryCompanyProcessRecordApi = async (data: {
    companyName: string
    applyUserName: string
    queryStartDate: string
    queryEndDate: string
} & PageQueryDto): Promise<PageInfoDto<ListDto>> => {
    return request.get('/saas/company/processRecord/queryCompanyProcessRecord', {
        params: data
    })
}

/**
 * @description 审核公司
 * @param data
 * @returns
 */
export const processPassApi = async (data: {
    id: number
    channelId?: number
    receiptId?: number
    status: number
}): Promise<PageInfoDto<ListDto>> => {
    return request.post('/saas/company/processRecord/process', data)
}

